package com.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.order.pojo.ProductCategory;
import com.order.pojo.Systemlog;
import com.order.mapper.SystemlogMapper;
import com.order.service.ISystemlogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author cucu
 * @since 2025-08-21
 */
@Service
public class SystemlogServiceImpl extends ServiceImpl<SystemlogMapper, Systemlog> implements ISystemlogService {

    @Autowired
    SystemlogMapper systemlogMapper;

    @Override
    public PageInfo<Systemlog> selectPage(Integer pageNum, Integer pageSize, Systemlog systemlog) {
        PageHelper.startPage(pageNum, pageSize);
        QueryWrapper<Systemlog> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq(true, "logtype", systemlog.getLogtype());
        List<Systemlog> systemlogs = systemlogMapper.selectList(queryWrapper);
        return PageInfo.of(systemlogs);
    }
}
